package com.qyer.commons.http;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * User: Z J Wu Date: 2016/02/18 Time: 14:30 Package: com.qyer.words.app.result
 */
public class HttpResult {

  public static final String DEFAULT_STRA = "NONE-STRA";
  public static final String OK = "ok";
  public static final int STATUS_OK = 0;

  @JsonProperty("service_name")
  protected String serviceName;
  @JsonProperty
  protected String namespace;
  @JsonProperty
  protected int status;
  @JsonProperty
  protected String msg;
  @JsonProperty("time")
  protected long timeuse;
  @JsonProperty
  protected InnerHttpResult data;

  public HttpResult() {
  }

  public HttpResult(String serviceName, String namespace, int status, String msg, long timeuse,
                    InnerHttpResult data) {
    this.serviceName = serviceName;
    this.namespace = namespace;
    this.status = status;
    this.msg = msg;
    this.timeuse = timeuse;
    this.data = data;
  }

  public String getServiceName() {
    return serviceName;
  }

  public void setServiceName(String serviceName) {
    this.serviceName = serviceName;
  }

  public String getNamespace() {
    return namespace;
  }

  public void setNamespace(String namespace) {
    this.namespace = namespace;
  }

  public int getStatus() {
    return status;
  }

  public void setStatus(int status) {
    this.status = status;
  }

  public String getMsg() {
    return msg;
  }

  public void setMsg(String msg) {
    this.msg = msg;
  }

  public long getTimeuse() {
    return timeuse;
  }

  public void setTimeuse(long timeuse) {
    this.timeuse = timeuse;
  }

  public InnerHttpResult getData() {
    return data;
  }

  public void setData(InnerHttpResult data) {
    this.data = data;
  }
}

